/*************************************************************************
	> File Name: client.cc
	> Author: H.M. Lau
	> Mail: hm.lau@outlook.com
	> Created Time: 2023/09/13 23:18
 ************************************************************************/

#include "comm.hpp"

int main(int argc, char *argv[])
{
    int fd = open(ipcPath.c_str(), O_WRONLY);
    if (fd < 0) {
        perror("open");
        exit(1);
    }
    std::string buffer;
    while (1) {
        std::cout << "Please input message line>" << std::endl;
        std::getline(std::cin, buffer);
        write(fd, buffer.c_str(), buffer.size());
    }
    close(fd);
    return 0;
}


